package com.myzl.web.controller.visualization;

import com.myzl.coal.service.IAlarmEventService;
import com.myzl.coal.service.IDeviceService;
import com.myzl.coal.service.IRealTimeDataService;
import com.myzl.common.core.domain.AjaxResult;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName VisualizationControl
 * @Author wzb
 * @Date 2023/6/7 15:02
 * @Description
 */
@RestController
@Slf4j
@Data
@RequestMapping("/visualization/radar/")
public class RadarVisualizationController {
    private final IRealTimeDataService realTimeDataService;
    private final IAlarmEventService alarmEventService;
    private final IDeviceService deviceService;

    @GetMapping("/section")
    public AjaxResult section(@RequestParam(defaultValue = "101") Integer deviceId) {
        return realTimeDataService.sectionData(deviceId);
    }

    @GetMapping("/trend")
    public AjaxResult trend(@RequestParam(defaultValue = "101") Integer deviceId) {
        return realTimeDataService.trendData(deviceId);
    }

    @GetMapping("/averageThickness")
    public AjaxResult averageThickness(@RequestParam(defaultValue = "101") Integer deviceId) {
        return realTimeDataService.averageThickness1(deviceId);
    }

}
